package cn.edu.cqut.mdm.container;

import java.util.HashMap;
import java.util.Map;

import cn.edu.cqut.mdm.core.module.ModuleEntity;

public class LocalDefinedModuleContainer {
	private static LocalDefinedModuleContainer instance = new LocalDefinedModuleContainer();
	private Map<String, ModuleEntity> modules = new HashMap<String, ModuleEntity>();
	
	private LocalDefinedModuleContainer(){
	}
	
	public static LocalDefinedModuleContainer getInstance(){
		return instance;
	}
	
	public void addModule(ModuleEntity module) {
		this.modules.put(module.getUid(), module);
	}
	public ModuleEntity getModule(String uid) {
		return this.modules.get(uid);
	}
	public Map<String, ModuleEntity> getAllModuleMap() {
		return this.modules;
	}
}
